package com.exsun.ex1077.network.entity

import java.io.Serializable

//{
//    "vehicleNo": "鄂ABU761",
//    "startAddress": "湖北省,武汉市,黄陂区,距离盘龙城加油站1388米",
//    "mileageSum": 59430,
//    "beginTime": "2022-08-15 13:20:27",
//    "endTime": "2022-08-15 14:39:21",
//    "endAddress": "湖北省,孝感市,汉川市,距离五桂墩327米",
//    "speed": 56
//}

data class VehicleTrack(
    val beginTime: String? = null,
    val endAddress: String? = null,
    val endTime: String? = null,
    val mileageSum: String? = null,
    val speed: Double? = 0.0,
    val startAddress: String? = null,
    val vehicleNo: String? = null,
    val dvo: String? = null
): Serializable{
    fun mileageText() = "总里程：${mileageSum}KM"

    fun timeText() = "$beginTime 至 $endTime"

    fun speedText() = "${speed}km/h"

    fun startAddressText() = "起始地址：${startAddress}"

    fun endAddressText() = "最终地址：${endAddress}"
}